Skip to content

Add llhttp-ffi gem#1030

Merged
github-actions[bot] merged 3 commits intoruby:mainfrom
hakanensari:add-llhttp-ffi
Apr 19, 2026
Merged

Add llhttp-ffi gem#1030
github-actions[bot] merged 3 commits intoruby:mainfrom
hakanensari:add-llhttp-ffi

Conversation

@hakanensari
Copy link
Copy Markdown
Contributor

Minimal stubs for LLHttp::Parser, LLHttp::Delegate, and LLHttp::Error. Just the surface referenced by the http gem's bundled sig/http.rbs (class Handler < LLHttp::Delegate, attr_reader parser: LLHttp::Parser) plus the Parser methods http's Response::Parser calls.

Unblocks Steep users of the http gem, which otherwise fails signature load with RBS::NoSuperclassFoundError on LLHttp::Delegate.

Minimal stubs for LLHttp::Parser, LLHttp::Delegate, and LLHttp::Error —
just the surface referenced by the http gem's bundled sig/http.rbs
(class Handler < LLHttp::Delegate, attr_reader parser: LLHttp::Parser)
plus the Parser methods http's Response::Parser calls.

Unblocks Steep users of the http gem, which otherwise fails signature
load with RBS::NoSuperclassFoundError on LLHttp::Delegate.
Copilot AI review requested due to automatic review settings April 19, 2026 22:37
@github-actions
Copy link
Copy Markdown

@hakanensari Thanks for your contribution!

Please follow the instructions below for each change.
See also: https://github.com/ruby/gem_rbs_collection/blob/main/docs/CONTRIBUTING.md

Available commands

You can use the following commands by commenting on this PR.

  • /merge: Merge this PR if CI passes

llhttp-ffi

This RBS files are newly added.

You can merge this PR immediately if the CI passes.
Just comment /merge to merge this PR.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an RBS signature stub for the llhttp-ffi gem to provide the minimal LLHttp API surface needed by the http gem’s bundled RBS, preventing Steep/RBS signature load failures.

Changes:

  • Introduce LLHttp::Parser, LLHttp::Delegate, and LLHttp::Error stubs in a new llhttp-ffi.rbs.
  • Add a minimal _test that exercises subclassing LLHttp::Delegate and calling the referenced LLHttp::Parser methods.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
gems/llhttp-ffi/0.5/llhttp-ffi.rbs Adds minimal RBS surface for LLHttp (Parser, Delegate, Error) needed by downstream signatures.
gems/llhttp-ffi/0.5/_test/test.rbs Adds a signature-only test class inheriting from LLHttp::Delegate.
gems/llhttp-ffi/0.5/_test/test.rb Adds a runtime/Steep test that instantiates LLHttp::Parser and calls required methods.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread gems/llhttp-ffi/0.5/_test/test.rb
Comment thread gems/llhttp-ffi/0.5/_test/test.rbs Outdated
Use LLHttp::Delegate.new directly instead of defining a subclass in the
test. Drops the companion test.rbs since there's no custom Ruby class
left to declare. Steep already validates the subclass case when it
loads http.rbs (class Handler < LLHttp::Delegate), so the test doesn't
need to exercise it too.
@hakanensari
Copy link
Copy Markdown
Contributor Author

/merge

@github-actions github-actions Bot merged commit 0a65a84 into ruby:main Apr 19, 2026
5 checks passed
@hakanensari hakanensari deleted the add-llhttp-ffi branch April 19, 2026 22:47
@hakanensari hakanensari mentioned this pull request Apr 19, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants